body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #e0e0e0;
    transition: background 0.5s;
}

.container {
    width: 420px;
    margin: 40px auto;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    padding: 24px 24px 16px 24px;
    text-align: center;
}

h1 {
    margin-bottom: 12px;
    color: #333;
}

.score-bg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 18px;
}

#bg-switch {
    padding: 4px 12px;
    border: none;
    background: #4caf50;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s;
}
#bg-switch:hover {
    background: #388e3c;
}

#gameCanvas {
    background: #222;
    border: 2px solid #333;
    border-radius: 8px;
    display: block;
    margin: 0 auto 12px auto;
}

.tips {
    color: #888;
    font-size: 14px;
}

/* 多种背景样式 */
.bg1 { background: linear-gradient(135deg, #e0e0e0 0%, #b2dfdb 100%); }
.bg2 { background: linear-gradient(135deg, #f8bbd0 0%, #f48fb1 100%); }
.bg3 { background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%); }
.bg4 { background: linear-gradient(135deg, #ffe082 0%, #ffd54f 100%); }
.bg5 { background: linear-gradient(135deg, #c8e6c9 0%, #81c784 100%); }

/* 游戏结束弹窗样式 */
#gameOverModal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#gameOverModal .modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px 40px 24px 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    text-align: center;
    min-width: 240px;
}
#gameOverModal h2 {
    margin: 0 0 12px 0;
    color: #e53935;
}
#gameOverModal #finalScore {
    font-size: 20px;
    margin-bottom: 18px;
    color: #333;
}
#gameOverModal #restartBtn {
    padding: 8px 24px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
#gameOverModal #restartBtn:hover {
    background: #388e3c;
}

/* 开始游戏按钮样式 */
.start-btn {
    display: block;
    margin: 18px auto 0 auto;
    padding: 10px 32px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}
.start-btn:hover {
    background: #0d47a1;
} 